Adwaita: fix combos and buttons padding issues.
authorLapo Calamandrei <calamandrei@gmail.com>
Mon, 7 Jul 2014 09:45:13 +0000 (11:45 +0200)
committerLapo Calamandrei <calamandrei@gmail.com>
Mon, 7 Jul 2014 09:47:30 +0000 (11:47 +0200)
For some strage reason (bug?) combobox buttons needs -2px vertical padding
wrt buttons to have the same size as buttons.

gtk/resources/theme/Adwaita/_common.scss
gtk/resources/theme/Adwaita/gtk-contained-dark.css
gtk/resources/theme/Adwaita/gtk-contained.css

index 5309a1d6c06f5f73ed83aa74f8e360e2f70d3a27..51f5f270ad73201da9489f7abf7d78004cbdfbc9 100644 (file)
@@ -319,8 +319,10 @@ GtkLabel {
   }
 
   // buttons in header bars and action bars
-  &.image-button { padding: 8px; }
-  &.text-button { padding: 6px 8px 5px; } // due to font metrics
+  .header-bar &.image-button,
+  .action-bar &.image-button { padding: 8px; }
+  .header-bar &.text-button,
+  .action-bar &.text-button { padding: 6px 8px 5px; } // due to font metrics
 
   //inline-toolbar buttons
   .inline-toolbar &, .inline-toolbar &:backdrop {
@@ -569,10 +571,9 @@ GtkColorButton.button { padding: 4px; } // Uniform padding on the
  * ComboBoxes *
  **************/
 GtkComboBox {
-
-  //FIXME padding issue
-  padding: 0;
-
+  > .button { padding-top: 2px; padding-bottom: 2px; } // Otherwise combos
+                                                       // are bigger then
+                                                       // buttons
   -GtkComboBox-arrow-scaling: 0.5;
   -GtkComboBox-shadow-type: none;
 
index 8f46554c92145a9cb1b01ca938c6514592b62944..fcc66157ca6294e32c2ab89290dc4593c77fb6f7 100644 (file)
       text-shadow: none;
       icon-shadow: none;
       box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px rgba(238, 238, 236, 0.1); }
-  .button.image-button {
+  .header-bar .button.image-button, .action-bar .button.image-button {
     padding: 8px; }
-  .button.text-button {
+  .header-bar .button.text-button, .action-bar .button.text-button {
     padding: 6px 8px 5px; }
   .inline-toolbar .button, .inline-toolbar .button:backdrop {
     border-radius: 2px;
@@ -753,12 +753,14 @@ GtkColorButton.button {
  * ComboBoxes *
  **************/
 GtkComboBox {
-  padding: 0;
   -GtkComboBox-arrow-scaling: 0.5;
   -GtkComboBox-shadow-type: none;
   box-shadow: 0 1px rgba(238, 238, 236, 0.1);
   text-shadow: 0 -1px rgba(0, 0, 0, 0.81176);
   icon-shadow: 0 -1px rgba(0, 0, 0, 0.81176); }
+  GtkComboBox > .button {
+    padding-top: 2px;
+    padding-bottom: 2px; }
   GtkComboBox:insensitive {
     color: #939695;
     text-shadow: none;
index 36e2c0485a136a3be1f27af6a5105a7b0905e9cd..b686728ef29079fb9b1007039afa03fa9aa74a59 100644 (file)
       text-shadow: none;
       icon-shadow: none;
       box-shadow: inset 0 1px rgba(255, 255, 255, 0), 0 1px white; }
-  .button.image-button {
+  .header-bar .button.image-button, .action-bar .button.image-button {
     padding: 8px; }
-  .button.text-button {
+  .header-bar .button.text-button, .action-bar .button.text-button {
     padding: 6px 8px 5px; }
   .inline-toolbar .button, .inline-toolbar .button:backdrop {
     border-radius: 2px;
@@ -745,12 +745,14 @@ GtkColorButton.button {
  * ComboBoxes *
  **************/
 GtkComboBox {
-  padding: 0;
   -GtkComboBox-arrow-scaling: 0.5;
   -GtkComboBox-shadow-type: none;
   box-shadow: 0 1px white;
   text-shadow: 0 1px rgba(255, 255, 255, 0.76923);
   icon-shadow: 0 1px rgba(255, 255, 255, 0.76923); }
+  GtkComboBox > .button {
+    padding-top: 2px;
+    padding-bottom: 2px; }
   GtkComboBox:insensitive {
     color: #8d9091;
     text-shadow: none;